checkbutton: Draw background unconditionally
authorBenjamin Otte <otte@redhat.com>
Sat, 16 Aug 2014 22:58:04 +0000 (00:58 +0200)
committerBenjamin Otte <otte@redhat.com>
Sat, 16 Aug 2014 22:58:04 +0000 (00:58 +0200)
We want to draw backgrounds always, not just on prelight. Themes can
decide to only set a background during prelight themselves.

gtk/gtkcheckbutton.c
gtk/gtkradiobutton.c

index 9591e7796d2840f0619d71394fff8c37c8c9e231..08c2260e0853153dde732158f6871f36c17cb33a 100644 (file)
@@ -572,11 +572,10 @@ gtk_real_check_button_draw_indicator (GtkCheckButton *check_button,
   gtk_style_context_save (context);
   gtk_style_context_set_state (context, state);
 
-  if (state & GTK_STATE_FLAG_PRELIGHT)
-    gtk_render_background (context, cr,
-                           border_width, border_width,
-                           allocation.width - (2 * border_width),
-                           allocation.height - (2 * border_width));
+  gtk_render_background (context, cr,
+                         border_width, border_width,
+                         allocation.width - (2 * border_width),
+                         allocation.height - (2 * border_width));
 
   gtk_style_context_add_class (context, GTK_STYLE_CLASS_CHECK);
 
index ec15635018f415a622d410710313fa322469f6c7..69aab76f541dd08c34c352a7c7c4be395adfaa63 100644 (file)
@@ -871,11 +871,10 @@ gtk_radio_button_draw_indicator (GtkCheckButton *check_button,
   gtk_style_context_save (context);
   gtk_style_context_set_state (context, state);
 
-  if (state & GTK_STATE_FLAG_PRELIGHT)
-    gtk_render_background (context, cr,
-                           border_width, border_width,
-                           allocation.width - (2 * border_width),
-                           allocation.height - (2 * border_width));
+  gtk_render_background (context, cr,
+                         border_width, border_width,
+                         allocation.width - (2 * border_width),
+                         allocation.height - (2 * border_width));
 
   gtk_style_context_add_class (context, GTK_STYLE_CLASS_RADIO);